#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    cam = new pylon;
    connect(this,SIGNAL(shotSignal()),this,SLOT(shotSlot()));
}

MainWindow::~MainWindow()
{
    // Releases all pylon resources.
    PylonTerminate();
    delete ui;
}

void MainWindow::on_shoot_pushButton_clicked()
{
    cout << "shoot!" << endl;
    emit shotSignal();
}

void MainWindow::shotSlot()
{
    cam->start();
}
